const state = {
    viewer:null,
    layers:[],
    currentLayer:null
}
const mutations = {
    SET_VIEWER:(state,newvalue)=>{
        state.viewer = newvalue
    },
    SET_LAYERS:(state,newvalue) => {
        state.layers.push(newvalue)
    },
    SET_CURRENTLAYER:(state,newvalue) => {
        state.currentLayer = newvalue
    },
}
const actions = {
    setviewer({commit},newvalue){
        commit("SET_VIEWER",newvalue)
    },
    setlayers({commit},newvalue){
        commit('SET_LAYERS',newvalue)
    }
}
export default {
    namespaced: true,
    state,
    mutations,
    actions
}
